package com.company;

public class two {
    public static void main(String[] args) {
        float [] a = {0.3f,6.4f,2.3f,0.08f,5.6f,1.8f,5.1f};
        float max = a[0];
        float min = a[0];
        System.out.println("---float类型的数组---");
        for (float s : a){
            System.out.print(s+"   ");
        }
        System.out.println("");
        System.out.println("-----华丽的分割线-----");
        for (int i=0;i<a.length;i++){
            if (max<a[i]){
                max=a[i];
            }
            if (min>a[i]){
                min=a[i];
            }
        }
        System.out.println("float类型的数组的最大值为："+max);
        System.out.println("float类型的数组的最小值为："+min);
    }

}
